<!DOCTYPE html>
<html lang="zh-cmn-Hans">
  <head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" href="../../../../static/mobile/default/css/layout.css?v=2"/>
    <link rel="icon" type="image/png" href="../../../../static/favicon.ico"/>
        <script src="../../../../static/js/jquery/jquery/2.1.4/jquery.min.js"></script>
    <script src="../../../../static/js/jquery/jquery.cookie.js"></script>
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
    <script src="../../../../static/mobile/default/js/page.js?v=1"></script>
    <title>活动余额提现  - 达漂亮</title>
          
<link rel="stylesheet" href="../../../../static/mobile/default/css/payment.css" />
<script type="text/javascript">
    var offlineChoose = false;
</script>


</head>
<body >
  <div class="page payResult payment">
    		<div class="page-hd">
            <div class="header base-header bor-1px-b">
                <div class="header-left">
                    <a href="javascript:history.go(-1)" class="left-arrow"></a>
                </div>
                <div class="header-title">活动余额提现</div>
                <div class="header-right">
                    <!-- <a href=""></a> -->
                </div>
            </div>
        </div>
      
<div class="page-bd">
    <!-- 页面内容-->
    <div class="paType">
        <img src="../../../../static/mobile/default/images/payY.png" alt="">
                <p class="fs34 fw_b color_3">提现处理中 </p>
        <div class="color_3 fs72 num money">0.00</div>
        <span class="fs24 color_9">已提现金额</span>
        <span class="fs24 color_9">预计24小时内到账，请注意查收</span>
        
    </div>
    <div class="cellBox">
        <div class="line"></div>
        <!--<div class="cell">
            <span class="fs28 color_3">积分抵扣</span><span class="fs34 num color_3">0</span>
        </div>
        <div class="cell">
            <span class="fs28 color_3">优惠券</span><div class="color_3 fs28 num money"><p class="fw_b fm_p">￥</p><em class="fs34">0.00</em></div>
        </div>
        <div class="cell">
            <span class="fs28 color_3">折扣</span><div class="color_3 fs28 num money"><p class="fw_b fm_p">￥</p><em class="fs34">12400.00</em></div>
        </div>-->
        <!--<div class="cell">-->
        <!--    <span class="fs28 color_3">运费</span><div class="color_3 fs28 num money"><p class="fw_b fm_p">￥</p><em class="fs34">0.00</em></div>-->
        </div>
    </div>
    <div class="button">
        <a href="./withdrawActivity.html" class="color_w fs28 BGcolor_r fw_b">继续提现</a>
        <!--<a class="color_w fs28 BGcolor_3 fw_b   view_order">查看订单</a>-->
            </div>
</div>
<link rel="stylesheet" href="../../../../static/mobile/default/css/payment.css?v=1" />
<link rel="stylesheet" href="../../../../static/mobile/default/css/userData.css" />
<link rel="stylesheet" href="../../../../static/mobile/default/css/wallet.css" />
<style>
    .text{
        padding: .2rem;
    }
    .account{
        background-color: #fff;
    }
    .oblock{
        margin: 0 .2rem .08rem;
        border-radius: .066667rem;
    }
    .oblock .type{
        display: flex;
        align-items: center;
        margin-bottom: .133333rem;
    }
    .oblock{
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        padding: .2rem 0;
        background-color: #ff00000a;
    }
    .oblock .type img{
        width: .266667rem;
        height: .266667rem;
        margin-right: .053333rem;
    }
    .weixinCode{
        width: 1.466667rem;
        height: 1.466667rem;
    }
    .oblock p{
        margin: .1rem 0 .2rem;
    }
    .chongzhi .button {
        width: 4.466667rem;
        margin: 0.266667rem 0.2rem;
        height: 0.533333rem;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
    .offlinepage{
        position:absolute;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100%;
        overflow: auto;
        z-index: 999;
    }

</style>
<div class="offlinepage">
    <div class="page-hd">
        <div class="header bor-1px-b">
            <div class="header-left">
                <a class="left-arrow" onClick="hideoff()"></a>
            </div>
            <div class="header-title">上传凭证</div>
            <div class="header-right">
                <a href=''></a>
            </div>
        </div>
    </div>
    <div class="page-bd chongzhi">
        <!-- 页面内容-->
        <div class="account">
            <div class="text fs28">您需要转款至以下任一账户</div>
            <div class="oblock">
                <div class="type"><img src="../../static/mobile/default/images/weixinPay.png" alt=""><span class="fs28">微信收款码</span></div>
                <img src="" alt="" class="weixinCode">
            </div>
            <div class="oblock">
                <div class="type"><img src="../../static/mobile/default/images/aliPay.png" alt=""><span class="fs28">支付宝收款码</span></div>
                <img src="" alt="" class="weixinCode">
            </div>
            <div class="oblock">
                <div class="type"><img src="../../static/mobile/default/images/offlinePay.png" alt=""><span class="fs28">银行账户</span></div>
                <p class="fs32 fw_b color_3"></p>
                <span class="fs28 color_3"></span>
                <div class="fs28 color_3"><span></span></div>
            </div>
        </div>
         <div class="uploading" style="display: block; ">
                <div class="title fs32 fw_b color_3">上传收款二维码（必须)</div>
                <div class="uploadBox" >

                    <div class="Box" id="upload_qrcode_box">
                        <img src="../../static/mobile/default/images/addImg.png" alt="" class="imgBox">
                        <input type="file" class="uploadInput" >
                    </div>
                    <div></div>
                </div>
            </div>
        <!-- <div class="uploading" style="display: block; " >
            <div class="title fs28 fw_b color_3">上传打款凭证（必须)</div>
            <div class="uploadBox" style="flex-wrap: wrap;overflow: initial;">
                <ul class="weui-uploader__files uploaderFiles" id="uploaderFiles1">
                </ul>
                <form enctype="multipart/form-data" id="uploadForma">
                <div class="Box">
                    <img src="../../static/mobile/default/images/addImg.png" alt="" class="imgBox">
                        <input id="uploadInput" onchange="uploadFile(this,event)" class="weui-uploader__input"
                               type="file"
                               accept="image/*" multiple="">
                </div>
                </form>
                <div ></div>
            </div>
        </div> -->
        <div class="button fs32 fw_b color_w BGcolor_r buttBox payBtn"><span>提交</span></div>
    </div>
    <!-- 弹出提示 -->
    <div class="layout" style="display: none">
        <div class="layoutBG"></div>
        <div class="layoutBox">
            <div class="text fs30 color_3 bor_b">
                您还未上传支付凭证！
            </div>
            <!-- 单按钮 -->
            <div class="button fs32 color_9">
                知道了
            </div>
        </div>
    </div>
</div>
<script>

    var fd = new FormData();
    var imgNum = 0;
    $('.money').text(getUrlParam('money'))
     // $('.free').text(getUrlParam('free'))
    // $('.view_order').attr('href','/shop/order/info/order_id/orderDetails.html?orderId='+getUrlParam('orderId'))

    //选择上传图片
    function uploadFile(_this,e){

        var formData = new FormData($("#uploadForma")[0])  //创建一个forData
        formData.append('file', $('#uploadInput')[0].files[0]) //把file添加进去  name命名为img
        $.ajax({
            url: '/member/api._passport/proposal_img.html',
            data: formData,
            type: "POST",
            async: false,
            cache: false,
            contentType: false,
            processData: false,
            success: function (data) {

                if (data.code == 1) {
                    _alert(data.msg);
                    return false;

                }
                imgNum++;
                fd.append("imgfile["+imgNum+"]", data.url);
                $('#uploaderFiles1').before('<div class="Box"><img src="'+ data.url+'" alt="" class="imgBox payimg"><img src="../../static/mobile/default/images/closeImg.png" alt="" data-imgnum="'+imgNum+'" class="closeImg"></div>');
            },
            error: function () {
                //失败
            }

        });

    }
    function hideoff(){
        $('.offlinepage').css('left','100%');
        offlineChoose = false;
    }
</script>
<script src="../../../../static/mobile/default/js/uploadsimage.js?v=1"></script>
<script>
    //处理点击改变的调用函数-做IOS兼容
    $(_listenSelector).click(function(){
            var that = $(this);
     
            _uplocalfunction=function(base64Img){
                   fd.append("qrcodefile", base64Img);
                   $(that).parent().before('<div class="Box"><img src="'+base64Img+'" alt="" class="imgBox payimg"><img src="../../static/mobile/default/images/closeImg.png" alt="" class="closeImg" data-type="one"></div>');
                   $('#upload_qrcode_box').css('visibility','hidden');
                   //$(_listenSelector).hide();
            } 
           
    })
</script>
<!-- 支付方式 -->
<div class="model">
    <div class="modelContent">
        <div class="closeBox"><img src="../../static/mobile/default/images/close_icon.png" alt=""></div>
        <div class="title fs36 color_3 fw_b">请选择支付方式</div>
        <div class="cantre pay" id="payListBox">

            <p class="get_list_tip">加载中...</p>

        </div>
        <div class="buttBox">
            <span class="fs32 fw_b color_w BGcolor_r payBtn">确认支付</span>
        </div>
    </div>
</div>

<script type="text/html" id="payListTpl">
    {{each data as item index}}
    <div class="block">
        <label for="{{item.pay_code}}" style="width: 100%;">
            <div class="payType">
                <img src="../../static/mobile/default/images/{{item.img}}" alt="">
                <div>
                    <span class="fs30 color_3">{{item.pay_name}}</span>
                    {{if item.pay_code == 'balance'}}
                    <span class="fs26 color_r">(￥{{balance_money}})</span>
                    {{/if}}
                </div>
            </div>
        </label>
        <label for="{{item.pay_code}}">
            <div class="iconBox">
                <input type="radio" class="check" name="pay_id" value="{{item.pay_id}}" data-pay_code="{{item.pay_code}}" id="{{item.pay_code}}" >
                <i class="icon_checked"></i>
            </div>
        </label>
    </div>
    {{/each}}
</script>


  </div>

<script src="../../../../static/js/art-template.js"></script>
<script src="../../../../static/mobile/default/js/lib/fastclick.js"></script>
<script src="../../../../static/js/jquery/lazyload/jquery.lazyload.js"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
		$("img.lazy").lazyload({effect:"fadeIn",event:"scroll",container:$(".page-bd")});
    });
    
          share()
     function  share(){
    /***用户点击分享到微信圈后加载接口接口*******/
        var url=window.location.href;
        console.log("url:"+url);
            $.ajax({
		    url: "/api/mp/wxconfig",
		    type: "post",
		    data:{shareUrl:url},
		    headers:{ token: $.cookie('code')},
		    dataType: "json",
		    success: function(data){
		         configData = {
                    debug : false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                    appId: data.data.appid, // 必填，公众号的唯一标识
                    timestamp: data.data.timestamp, // 必填，生成签名的时间戳
                    nonceStr: data.data.nonceStr, // 必填，生成签名的随机串
                    signature: data.data.signature,// 必填，签名，见附录1
                    jsApiList : ['hideOptionMenu']
                    // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
               };
               
               //step2:注入配置信息
               wx.config(configData);
               //step3:通过ready接口处理成功验证
               wx.ready(function () {
                   // config信息验证后会执行ready方法，所有接口调用都必须在config接口获得结果之后，config是一个客户端的异步操作，所以如果需要在页面加载时就调用相关接口，则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口，则可以直接调用，不需要放在ready函数中。
//                 alert("执行ready方法");
//                 wx.checkJsApi({
//                      jsApiList: ['chooseImage'] // 需要检测的JS接口列表，所有JS接口列表见附录2,
//                      success: function(res) {
//                      // 以键值对的形式返回，可用的api值true，不可用为false
//                      // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
//                      }
//                 });
                   //接口1:获取网络类型
                    wx.getNetworkType({
                        success: function (res) {
                          oldNet = res.networkType; // 返回网络类型2g，3g，4g，wifi
//                        alert("网络类型"+ oldNet);
                        }
                     });
                   //禁用右上角菜单按钮
                   wx.hideOptionMenu();
		    })
		    },
		    error: function() {
// 			    _alert('ajax request failed!!!!');
			    return;
		    } 
        })

	    
	    
	    }
</script>

<script type="text/javascript">
    var goPay = 0;

    $('.goupload').on('click',function(){
        //弹一下窗
        offlineChoose = true;
        //弹一下窗
        $('.offlinepage').css('left',0);
        $('#payListBox').html('<input type="radio" class="check" name="pay_id" value="3" data-pay_code="offline" id="offline"  checked="checked" style="display: none;">');
    })
    $('.base-header .left-arrow').attr('href','/')
    //选择支付方式
    $('.gopay').on('click',function(){
        jq_ajax('/publics/api.pay/getlist.html','',function(res){
            if (res.code==0){
                _alert(res.errmsg);
                return false;
            }
            $('#payListBox').html(template('payListTpl',res));
            $('.model').show();
        });
    });
    $('.closeBox').on('click',function(){
        $('.model').hide();
    });
    $('.payBtn').on('click',function(){
        var obj = $('input:radio[name="pay_id"]:checked');
        if (typeof(obj.val()) == 'undefined') {
            _alert('请选择支付方式.');
            return false;
        }
        var pay_code = obj.data("pay_code");

        //线下支付
        if(obj.val() == 3){
            //没弹窗
            if(offlineChoose == false){
                offlineChoose = true;
                //弹一下窗
                $('.offlinepage').css('left',0);
                return false;
            }
            //上传图片判断
            var payimg = $(".payimg").attr('src');
            if(typeof(payimg) == 'undefined' || payimg == ''){
                _alert('请上传支付凭证.');
                return false;
            }

            var arr = new Object();
            arr.order_id = 573;
            arr.pay_code = pay_code;
            arr.payimg = payimg;
            jq_ajax('/shop/api.flow/tooffline.html',arr,function(res){
                if (res.code==0){
                    _alert(res.errmsg);
                    return false;
                }
                // window.location.reload();
            })

        }
        window.location.href = '/publics/payment/getcode/?order_id=573&pay_code='+pay_code+'&types=';
    });
    if (goPay == 1){
        window.location.href = '/publics/payment/getcode/?order_id=573&pay_code=delivery'+'&types=';
    }
</script>

  <div class="alertBox">
      <div class="alertBG"></div>
      <div class="alert">
          <div class="text fs30 color_3 bor_b">

          </div>
          <!-- 单按钮 -->
          <div class="button fs32 fw_b color_r">
              知道了
          </div>
          <!-- 双按钮 -->
          <div class="buttonBox fs32 fw_b">
              <span class="color_9 bor_r cancel">取消</span>
              <span class="color_r confirm">确定</span>
          </div>
      </div>
  </div>
  <script type="text/javascript">
      var is_xcx = 0;
      $(document).on('click', 'a', function () {
          var href = $(this).attr('href');
          if (href.indexOf('/pages') != -1) {
              if (is_xcx == 1) {
                  wx.miniProgram.navigateTo({
                      url: href
                  })
                  return false;
              } else {
                  return false;
              }
          }
      })
  </script>
    </body>
</html>